<div class="pull-left">
  <button class="btn btn-default" (click)="clearAllCache()">清除所有店铺缓存</button>
</div>
<div class="form-inline pull-right">
  <input class="form-control" type="text" placeholder="请输入小程序名称" name="keyword" [(ngModel)]="searchData">
  <button class="btn btn-default" (click)="search()">检索</button>
  <button class="btn btn-default" (click)="reset()">重置</button>
</div>
<div class="table-responsive">
  <table class="table">
    <thead>
      <tr>
        <th>创建时间</th>
        <th>小程序名称</th>
        <th>创建者</th>
        <th>模板类型</th>
        <th>状态</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let item of appletList">
        <td>{{item.created_at}}</td>
        <td>{{item.name}}</td>
        <td>{{item.user.name}}</td>
        <td>{{item.template_category.name}}</td>
        <td>{{item.status}}</td>
        <td class="operate">
          <a href="javascript:;" (click)="turnClearCache(item.applet_uuid, item.name)">缓存管理</a>
        </td>
        <!--<td class="operate">-->
        <!--<span routerLink="../show/1">预览</span>- -->
        <!--<span>数据</span>- -->
        <!--<span routerLink="../eidt/1">编辑</span>-->
        <!--</td>-->
      </tr>
    </tbody>
  </table>
  <div class="text-center">
    <pagination (pageChanged)="pageChanged($event)" [totalItems]="totalItems" [itemsPerPage]="itemsPerPage" [(ngModel)]="currentPage" [maxSize]="5"
                previousText="&lsaquo;" nextText="&rsaquo;" firstText="&laquo;" lastText="&raquo;" [boundaryLinks]="true" class="pagination-sm"></pagination>
  </div>
</div>

<app-notification [type]="type" [message]="message" [isShow]="isShow" (promptIsShow)="isShow = $event;"></app-notification>
